#ifndef __OBSERVER_H__
#define __OBSERVER_H__

#include <string>
#include <iostream>

class Subject;

class Observer
{
protected:
    std::string name;
    Subject *sub = nullptr;
public:
    Observer(std::string name, Subject *sub): name(name), sub(sub) {}
    virtual void Update() = 0; 
};

class StockObserver: public Observer
{
public:
    StockObserver(std::string name, Subject *sub): Observer(name, sub) {}
    void Update() override;
};

class NBAObserver: public Observer
{
public:
    NBAObserver(std::string name, Subject *sub): Observer(name, sub) {}
    void Update() override;
};

#endif